<div class="ui-searchbar-wrap ui-border-b">
	<div class="ui-searchbar ui-border-radius">
	    <div class="ui-searchbar-text">{:I('keyword', '搜索商品')}</div>
	    <div class="ui-searchbar-input">
	    	<input type="text" name="keyword" id="keyword" placeholder="搜索商品" autocapitalize="off" value="{:I('keyword')}">
	    	<input type="hidden" name="uid" id="uid" value="{$_SESSION['userid']}"/>
	    </div>
	    <i class="iconfont icon-search"></i>
	</div>
	<button class="ui-searchbar-cancel">取消</button>
</div>
<script type="text/javascript">
	$('body').on('tap', '.focus div .icon-search', function(){
		var keyword = $('#keyword').val(),
	        	uid = $('#uid').val(),
	        	url = "{:U('Index/allGoods')}";

	        if( url.indexOf('?')>0 ){
	            url += '&keyword=' + keyword + '&uid=' + uid;
	        }else{
	            url += '?keyword' + keyword + '&uid=' + uid;
	        }
			window.location.href = url;
	});
	
</script>